package com.sky.constant;

/**
 * @Author 褚金龙
 * @Date 2024/8/30 0:40
 */

/**
 * 设置线程的局部变量
 */
public class BaseContext {

        public static ThreadLocal<Long> threadLocal = new ThreadLocal<>();

        public static void setCurrentId(Long id) {
            threadLocal.set(id);
        }

        public static Long getCurrentId() {
            return threadLocal.get();
        }

        public static void removeCurrentId() {
            threadLocal.remove();
        }


}
